﻿namespace System.Web.Mvc
{
    public static class HtmlHelperExtensions
    {
        public static void RenderPartial(this HtmlHelper htmlHelper, string viewName)
        {
            Controller controller = (Controller)htmlHelper.ViewContext.Controller;
            controller.RenderPartial(viewName);
        }

        public static void RenderPartial(this HtmlHelper htmlHelper, string viewName, object viewData)
        {
            Controller controller = (Controller)htmlHelper.ViewContext.Controller;
            controller.RenderPartial(viewName, viewData);
        }
    }
}
